const mongoose = require('mongoose')
const mongoosePaginate = require('mongoose-paginate-v2')
const Schema = mongoose.Schema

let FavoriteSchema = new Schema({
  opCode: String,
  opName: String,
  productId: {
    type: Schema.Types.ObjectId,
    ref: 'Product'
  }
})
FavoriteSchema.plugin(mongoosePaginate)
// Export the model
module.exports = mongoose.model('Favorite', FavoriteSchema)